﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;
using EntityDataModel;

namespace LiveCPEWebService.Entity
{
    [DataContractAttribute]
    public class CommentWS
    {
         [DataMember]
         public String AuthorName;
         [DataMember]
         public String CommentContent;
         [DataMember]
         public Guid CommentID;
         [DataMember]
         public int NumLike;
         [DataMember]
         public Guid MessageID;
         [DataMember]
         public DateTime PublicationDate;

        public void Generate(Comment pComment)
        {
            AuthorName = pComment.AuthorName;
            CommentContent = pComment.CommentContent;
            CommentID = pComment.CommentID;
            NumLike = (int)pComment.NumLike;
            MessageID = pComment.MessageID;
            PublicationDate = pComment.PublicationDate;
        }
    }
}